import request from '@/utils/request'

// 查询客户列表
export function listCustom(query) {
  return request({
    url: '/custom/custom/list',
    method: 'get',
    params: query
  })
}
// 查询客户列表带权限
export function listCustomData(query) {
  return request({
    url: '/custom/custom/listData',
    method: 'get',
    params: query
  })
}
export function listAllCustom(query) {
  return request({
    url: '/custom/custom/allList',
    method: 'get',
    params: query
  })
}

// 查询客户详细
export function getCustom(id) {
  return request({
    url: '/custom/custom/' + id,
    method: 'get'
  })
}

// 新增客户
export function addCustom(data) {
  return request({
    url: '/custom/custom',
    method: 'post',
    data: data
  })
}

// 修改客户
export function updateCustom(data) {
  return request({
    url: '/custom/custom',
    method: 'put',
    data: data
  })
}

// 分派客户
export function sendCustom(data) {
  return request({
    url: '/custom/custom/send',
    method: 'post',
    data: data
  })
}

// 领取客户
export function getCustoms(data) {
  return request({
    url: '/custom/custom/getCustoms',
    method: 'post',
    data: data
  })
}

// 删除客户
export function delCustom(id) {
  return request({
    url: '/custom/custom/' + id,
    method: 'delete'
  })
}
